package cn.sc.summer.calculate.task;

import cn.sc.summer.calculate.service.TaskService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 类名：初始化定时任务
 *
 * @author a-xin
 * @date 2024/2/4 13:49
 */
@Slf4j
@Component
public class TaskRunner implements CommandLineRunner {

    @Resource
    private TaskService taskService;

    @Override
    public void run(String... args) {
        taskService.initSchedule();
    }

}
